﻿@model Mangox.Model.Stock.NewsResultModel
@{
    ViewBag.Title = Model.NewsTitle + "_" + MGXAPI.Controllers.NewsController.siteNameNews;
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<style>
    .label_1 {
        display: inline-block;
        padding: 0 4px;
        height: 18px;
        line-height: 18px;
        background: #6294b5;
        font-size: 12px;
        cursor: pointer;
        color: #fff;
        border-radius: 2px;
        margin-right: 2px;
    }
</style>

<body class="micronews">

    <div class="micronews-container micronews-details-container w1000">
        <div class="layui-fluid">
            <div class="layui-row">
                <div class="layui-col-xs12 layui-col-sm12 layui-col-md8">
                    <div class="main">
                        <div class="title">
                            <h3>@Model.NewsTitle</h3>
                            <div class="b-txt">
                                @*<span class="label_1">@ViewBag.Model.Source</span>*@
                                <span class="label">@Model.ArticleTypeStr</span>
                                
                                <span class="icon">
                                    <i class="layui-icon layui-icon-radio"></i>
                                    <b>@Model.ViewCount</b>人
                                </span>
                                <a href="#message">
                                    <span class="icon message">
                                        <i class="layui-icon layui-icon-dialogue"></i>
                                        <b>@Model.CommentCount</b>条
                                    </span>
                                </a>
                                <span class="icon time">
                                    <i class="layui-icon layui-icon-log"></i>
                                    @Model.PubTime
                                </span>
                            </div>
                        </div>
                        <div class="article">

                            @Html.Raw(@Model.NewsContent)

                            <div class="share-title">
                                <span class="txt">分享:</span>
                                <a href="javascript:void(0)">
                                    <i class="icon layui-icon layui-icon-login-wechat"></i>
                                </a>
                                <a href="javascript:void(0)">
                                    <i class="icon layui-icon layui-icon-login-weibo"></i>
                                </a>
                                <a href="javascript:void(0)">
                                    <i class="icon layui-icon layui-icon-login-qq"></i>
                                </a>
                                <button class="layui-btn Collection">
                                    ❤<span>已收藏</span>
                                </button>
                            </div>
                        </div>
                        <div class="leave-message" id="message">
                            <div class="tit-box">
                                <span class="tit">网友跟帖</span>
                                <span class="num"><b>500</b>条</span>
                            </div>
                            <div class="content-box">
                                <div class="tear-box">
                                    <a href="javascript:void(0)"><img src="~/Content/wenews/images/header_img1.png"></a>
                                    <form class="layui-form">
                                        <div class="layui-form-item layui-form-text">
                                            <div class="layui-input-block">
                                                <textarea id="onInput" placeholder="请输入内容" class="layui-textarea"></textarea>
                                            </div>
                                        </div>
                                        <div class="layui-form-item">
                                            <div class="layui-input-block" style="text-align: right;">
                                                <div class="message-text">
                                                    <div class="txt">

                                                    </div>
                                                </div>
                                                <button type="button" class="layui-btn micronews-details-Publish">发表</button>
                                            </div>
                                        </div>
                                    </form>
                                </div>
                                <div class="ulCommentList">
                                    <div class="liCont">
                                        <a href="javascript:void(0)"><img src="~/Content/wenews/images/header_img1.png"></a>
                                        <div class="item-cont">
                                            <div class="cont">
                                                <p><span class="name">我是锦鲤</span><span class="time">1小时前</span></p>
                                                <p class="text">万达似乎在重新考虑该事项。此外，万达已经为这个项目支付高达8000万美元的费用和税款，但项目却迟迟未开工。</p>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div id="micronews-details-test" style="text-align: center;"></div>
                            </div>
                        </div>
                    </div>
                </div>


                <!-- 留言模版引擎 -->
                <script type="text/html" id="messageTpl">
                    <div class="liCont">
                        <a href="">
                            <img src="{{d.avatar}}">
                        </a>
                        <div class="item-cont">
                            <div class="cont">
                                <p><span class="name">{{d.name}}</span><span class="time">1小时前</span></p>
                                <p class="text">{{d.cont}}</p>
                            </div>
                        </div>
                    </div>
                </script>


                <div class="layui-col-xs12 layui-col-sm12 layui-col-md4">
                    <div class="popular-info popular-info-tog">
                        <div class="layui-card">
                            <div class="layui-card-header">
                                <h3>资讯推荐</h3>
                            </div>
                            <div class="layui-card-body">
                                <ul class="list-box" id="newsRecommend_ul">

                                    @*<a href="javascript:void(0)"><img src="~/Content/wenews/images/news_img15.jpg" width="100%"> </a>
                                    <li class="list">
                                        <a href="javascript:void(0)">南非金砖会议再造十年辉煌</a>
                                    </li>
                                    <li class="list">
                                        <a href="javascript:void(0)">中流击水 奋楫者进_中共十九大</a>
                                    </li>
                                    <li class="list">
                                        <a href="javascript:void(0)">你好！新时代_2018全国两会</a>
                                    </li>*@

                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script id="newsRecommend" type="text/html">
        {{#  layui.each(d.Data, function(index, item){ }}
        @*<a href="javascript:void(0)"><img src="/Content/wenews/images/news_img15.jpg" width="100%"></a>*@

        @* layui判断 *@
        {{#  if(item.NewsRecHtml != null){ }}
        {{item.NewsRecHtml}}
        {{#  } }}

        <li class="list">
            <a target="_blank" href="{{item.NewsUrl}}">{{item.NewsTitle}}</a>
        </li>
        {{#  }); }}
    </script>

    <!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script>
        layui.config({
            base: '/Scripts/wenews/'
        }).use('index', function () {
            var index = layui.index, $ = layui.$;
            index.EnterMessage()
            index.Page('micronews-details-test', 50)
            var collOff = true;
            $('.Collection').on('click', function () {
                if (collOff) {
                    $(this).addClass('active')
                } else {
                    $(this).removeClass('active')
                }
                collOff = !collOff
            })
            index.seachBtn()
            index.onInput()
            index.arrowutil()
            index.newsRecommend()
            });

    </script>
</body>




